import { Label, Tooltip } from '@patternfly/react-core';

const tooltip =
    'This CVE has a public exploit, and this CVE is unpatched in your system. CVEs with this label should be addressed with high priority due to the risks posed by them. The existence of this label does not mean we have taken steps to determine if the CVE has been exploited in your environment.';

export type KnownExploitLabelProps = {
    isCompact: boolean; // true for table and false for vulnerability page
};

function KnownExploitLabel({ isCompact }: KnownExploitLabelProps) {
    return (
        <Tooltip content={tooltip} position="top-start" isContentLeftAligned>
            <Label color="red" isCompact={isCompact}>
                Known exploit
            </Label>
        </Tooltip>
    );
}

export default KnownExploitLabel;
